Another use of conditional compilation is to avoid reinclusion of header files which are themselves #included into other headers. (TC provides a simpler method to accomplish this.*) For a header file named 'filename.h', a common approach is to begin the file with:
# ifndef filename_h /* like #ifdef, but means "if not defined" */
# define filename_h
and end the file with:
# endif
Also, note that it is legal to nest #ifdef/#endif conditions.
Certain names are defined automatically by the system in use. For example, the name THINK_C is defined whenever the TC compiler is in use. The following section demonstrates how to allow TC programs to compile equally under C++.